import time
import allure


def add_img_2_report(driver,step_name,need_sleep=True):
    if need_sleep:
        time.sleep(2)
    allure.attach(driver.get_screenshot_as_png(),step_name+".png",allure.attachment_type.PNG)